home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGMISC
/
DIGITOL2.LZH
/
VRMOD.DOC
< prev
next >
Wrap
Text File
|
1989-06-24
|
5KB
|
154 lines
------------------------------------------------------------------------------
Initialization routine
----------------------
Declaration:
short pascal far RVOICE_INIT(void)
This must be called once before any of the other routines are called. It hooks
the interrupt service routine into the timer tick interrupt vector.
Return value Meaning
------------ -------
0 success
1 voice package already initialized
2 wrong CPU, won't run on 8088 or 8086
NOTE: RVOICE_INIT installs a Control-Break (Int 23h) handler which makes sure
that the 8253 timer chip and the timer tick vector are restored to
their original state before program termination. If your program
installs its own Int 23h handler, then (a) It should be done after
the call to RVOICE_INIT, and (b) It must call RVOICE_CBREAK before it
allows the program to terminate. Failure to do this will result in
a system crash.
------------------------------------------------------------------------------
Cleanup routine
---------------
Declaration:
short pascal far RVOICE_CLEANUP(void)
This restores the timer tick interrupt vector to its previous state. This
routine must be called before the main program exits to DOS, unless the main
program is memory-resident.
Return value Meaning
------------ -------
0 success
1 voice package was not in the initialized state
------------------------------------------------------------------------------
Start routine
-------------
Declaration:
short pascal far RVOICE_START(blockaddr,blocklen,
filewrite,handle,port,startpos)
unsigned char far *blockaddr;
long blocklen;
unsigned short filewrite;
unsigned short handle;
short port;
long startpos;
This call initiates a voice input operation. It returns to the caller
immediately. Voice input will continue asynchronously (background).
Parameter Size Description
--------- ---- -----------
blockaddr 4 A far pointer to the memory block used for voice data.
blocklen 4 A dword indicating the length of the memory block.
filewrite 2 A flag word. If this is 1, then data will be written to
a file. If it is 0, then no file operations will be
performed.
handle 2 An open file handle. This is ignored if the flag word
is 0.
port 2 The number (1 thru 4) of the COM port to be used for input.
startpos 4 The byte offset within the memory block where recording
will begin.
Return value Meaning
------------ -------
0 success
1 block size is too small (blocklen < 8192 and
file write = yes)
2 voice recording is already in progress
3 a COM port number not within the range of 1 thru 4
was specified
4 starting position is greater than block length
------------------------------------------------------------------------------
Catch-up routine
----------------
Declaration:
short pascal far RVOICE_CATCHUP(void)
This must be called frequently from the main program if file writing is being
used and the length of the data to be recorded is longer than the length of
the memory block. The routine checks the progress of the address pointer in
use by the interrupt service routine and writes new available data to the
file.
Return value Meaning
------------ -------
0 success
1 no new data to write -- this is not an error; it just
means that the file was already "up-to-date"
2 error while writing file
------------------------------------------------------------------------------
Stop routine
------------
Declaration:
void pascal far RVOICE_STOP(void)
This must be called to terminate the voice input operations.
------------------------------------------------------------------------------
Status routine
--------------
Declaration:
void pascal far RVOICE_STATUS(pcount,pindex)
long far *pcount;
long far *pindex;
This will report the status of voice operations.
The first parameter is a far pointer to a dword which will receive the number
of bytes which have been input.
The second parameter is a far pointer to a dword which will receive the
offset within the block of the next byte to be filled by voice data input.